In [1]:
using PyPlot
import DSP
In [2]:
include("../juwvid.jl")
Out[2]:
In [3]:
# multicomponent data (Boashash+15,p346,Example 6.2.2)
nsample=1024
t,x=sampledata.genmultifm622(nsample);
PyPlot.plot(t,x)
PyPlot.xlabel("t")
PyPlot.ylabel("y")
Out[3]:
In [4]:
# S-method (constant Lp=6)
sm1=smethod.tfrsm(x,NaN,6,NaN,4);
In [5]:
# initial guess: (t,f) = (-1,80), end point: t=1, window width of df=5.0
tx,fx=iftrack.track_mode(sm1,t,-1.0,80.0,1.0,5.0)
# initial guess: (t,f) = (-0.2,70), end point: t=0.2, window width of df=5.0
txx,fxx=iftrack.track_mode(sm1,t,-0.2,70.0,0.2,5.0);
In [7]:
fig=PyPlot.figure()
ax = fig[:add_subplot](1,1,1)
a=juwplot.wtfrshow(abs.(sm1),t[2]-t[1],t[1],t[end],NaN,NaN,0.7*2,"gist_gray")
PyPlot.plot(tx,fx,"*",color="C3",lw=2)
PyPlot.plot(txx,fxx,"+",color="C1",lw=2)
PyPlot.title("S-method (Lp=6)")
PyPlot.xlabel("time")
PyPlot.ylabel("frequency")
PyPlot.legend(["Tracking A","Tracking B"])
PyPlot.ylim(0,120)
Out[7]:
In [ ]: